package com.example.easybuy.service;

import com.example.easybuy.pojo.Products;
import com.example.easybuy.pojo.ProductsManage;
import com.example.easybuy.pojo.SolrPage;
import org.apache.commons.math3.stat.descriptive.summary.Product;
import org.apache.solr.client.solrj.SolrServerException;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.IOException;
import java.util.List;

public interface ProductsService {
    /**
     * 添加数据到Solr
     * @return
     * @throws IOException
     * @throws SolrServerException
     */
    public  List<Products>  addProducts() throws IOException, SolrServerException;


    /**
     * 模糊查询
     * 根据三级分类id查
     * 查询所有
     * @param classifythree
     * @param currentPage
     * @return
     */
    public SolrPage<Products> proList(String name,String classifythree,String classifyone, String currentPage);



    public List<Products> goodsById(String id);


    public Products goodsByIdView(String id);



    public String deletePro(String pid) throws IOException, SolrServerException;

    public String delView() throws IOException, SolrServerException;

    /*
    添加商品到solr
     */
    public String addProductsManage(Products products);









}
